package com.person.leetcode.editor.cn;

/**
 *  妙
  * 9.回文数
  * 2023-02-15 11:07:44
**/
public class Sequence_0009_PalindromeNumber {
    public static void main(String[] args) {
        Solution solution = new Sequence_0009_PalindromeNumber().new Solution();
    }
    //leetcode submit region begin(Prohibit modification and deletion)
class Solution {
    public boolean isPalindrome(int x) {
        if (x<0 || x%10==0&&x!=0) return false;
        int temp = 0;
        while(x>temp){
            temp = temp*10+x%10;
            x/=10;
        }
        return x==temp || x == temp / 10;
    }
}
//leetcode submit region end(Prohibit modification and deletion)

}